home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / pdq_41.arc / PDQ-XFR.ASP < prev    next >
Text File  |  1990-03-24  |  5KB  |  195 lines

  1. ;     ---------- Variables ----------
  2. ;
  3. ;     S0 - Qwikmail Transfer Switch
  4. ;     S1 - File Transfer Switch
  5. ;     S2 - Files Line 1
  6. ;     S3 - Files Line 2
  7. ;     S4 - Files Line 3
  8. ;     S5 - Auto Logoff Switch
  9. ;     S6 - ASP File To Chain
  10. :     S9 - Toggle Bulletins Switch
  11. ;
  12. ;     Directories:  c:\pcp     - Procomm Plus directory 
  13. ;                   c:\ez      - EZ-Reader or Qmail directory
  14. ;                   c:\ez\bak  - Backup directory for REP and QWK files
  15. ;
  16. ;     Search below and replace by your directory names.
  17. ;
  18.  
  19. MAIN:
  20.  
  21. ; Isfile "c:\pcp\PDQ.LOG"        ; Check for Log file from previous Run
  22. ; If Success
  23. ;    Dos "del c:\pcp\PDQ.LOG"    ; Delete previous Log file
  24. ; Endif
  25.  
  26. ; Log open "c:\pcp\PDQ.LOG"      ; Open new Log file
  27.  
  28.  Switch s0                       : Mail Transfer
  29.      Case "N"
  30.          Switch s9               : Toggle Bulletins
  31.              Case "Y"
  32.                  Gosub QMAIL
  33.              Endcase
  34.          EndSwitch
  35.      Endcase
  36.      Default                    
  37.          Gosub QMAIL
  38.      Endcase                      
  39.  Endswitch
  40.  
  41.  Switch s1                       ; File Transfer
  42.      Case "Y"
  43.          Gosub FILES
  44.      Endcase
  45.  Endswitch
  46.  
  47.  Switch s5                       ; Auto Logoff
  48.      Case "Y"
  49.          Waitfor "NO CARRIER" 60
  50.          Hangup
  51.      Endcase
  52.  Endswitch
  53.  
  54. ; Log close
  55.  Exit
  56.  
  57. ;----------------------------- SUBROUTINES -----------------------------
  58.  
  59. QMAIL:
  60.  Atsay  22  1 31 "Opening MarkMail Door..."
  61.  Locate 23 36
  62.  Transmit "open 10^M"
  63.  Waitfor  "Command? "
  64.  Switch s9                    ; Toggle Bulletins
  65.      Case "Y"
  66.          Transmit "C^M"
  67.          Waitfor  "Return: "
  68.          Transmit "2^M"
  69.          Waitfor  "Return: "
  70.          Transmit "^M" 
  71.          Waitfor  "Command? "
  72.      Endcase 
  73.  Endswitch
  74.  Switch s0                    ; Reply Transfer 
  75.      Case "N"
  76.      Endcase
  77.      Default 
  78.          Isfile "c:\ez\inv-fac.rep"                   ; check for rep to upload
  79.          If Success
  80.             Transmit "U^M"
  81.             Dos "copy c:\ez\inv-fac.rep c:\ez\bak"    ; keep backup latest rep
  82.             Dos "c:\pcp\zmodem-u c:\ez\inv-fac.rep"   ; upload replies
  83.             Waitfor "Command?"
  84.             Dos "del c:\ez\inv-fac.rep"               ; delete uploaded rep
  85.          Endif
  86.      EndCase
  87.  EndSwitch
  88.  Switch s0                    ; Mail Transfer
  89.      Case "Y"
  90.          Transmit "D^M"
  91.          Waitfor "Done? " 300
  92.          If Waitfor
  93.             Transmit "Y^M"
  94.             Dos "copy c:\ez\inv-fac.qwk c:\ez\bak" ; keep backup of latest qwk
  95.             Waitfor "INV-FAC.QWK" 300           
  96.             Dos "c:\pcp\zmodem-d c:\ez"            ; download mail
  97.             Pause 1
  98.             Transmit "^M"
  99.             Waitfor "Command?"
  100.          Endif
  101.      Endcase
  102.  Endswitch
  103.  Switch s9                    ; Toggle Bulletins
  104.      Case "Y"
  105.          Transmit "C^M"
  106.          Waitfor  "Return: "
  107.          Transmit "2^M"
  108.          Waitfor  "Return: "
  109.          Transmit "^M" 
  110.          Waitfor  "Command? "
  111.      Endcase 
  112.  Endswitch
  113.  Switch s1                    ; File Transfer
  114.      Case "Y"
  115.          Transmit "Q^M"
  116.          Waitfor "Command?"
  117.      Endcase
  118.      Case "N"
  119.          Switch s5            ; Auto Logoff  
  120.              Case "N"
  121.                  Transmit "Q^M"
  122.              Endcase
  123.              Case "Y"
  124.                  Init n1 10
  125.                  Gosub AUTO
  126.              Endcase
  127.          Endswitch
  128.      Endcase
  129.  Endswitch
  130.  Return
  131.  
  132. ;---------------------------------------------------------------------
  133.  
  134. AUTO:
  135.  Fatsay 22  0 31 "Logging Off After %u Seconds - ESC to Abort...   " n1
  136.  Pause 1
  137.  Dec n1
  138.  If Not Zero n1
  139.      Goto AUTO
  140.  Endif
  141.  Transmit "G^M"
  142.  Return
  143.  
  144. ;----------------------------------------------------------------------
  145.  
  146. FILES:
  147.  Atsay  22  1 31 "Opening ProDoor File Transfer Door..."
  148.  Locate 23 36
  149.  Transmit "OPEN 7^M"
  150.  Cwhen
  151.  When "continue: " "^M"
  152.  Waitfor "Command? "
  153.  Transmit "d "
  154.  Switch s2
  155.      Case _null
  156.          Goto FILES1
  157.      Endcase
  158.      Transmit s2
  159.      Transmit "^M"
  160.      Waitfor ": "        ; Filespec
  161. FILES1:
  162.      Switch s3
  163.          Case _null
  164.              Goto FILES2
  165.          Endcase
  166.      Endswitch
  167.      Transmit s3
  168.      Transmit "^M"
  169.      Waitfor ": "        ; Filespec
  170. FILES2:
  171.      Switch s4
  172.          Case _null
  173.              Goto NOFILES
  174.          Endcase
  175.      Endswitch
  176.      Transmit s4
  177.      Transmit "^M"
  178.      Waitfor ": "        ; Filespec
  179. NOFILES:
  180.      Transmit "^M"
  181.      Waitfor  "(A)bort? "
  182.      Pause 1
  183.      Switch s5           ; Auto Logoff
  184.          Case "Y"
  185.              Transmit "G^M"
  186.              Dos "c:\pcp\zmodem-d"       ; your zmodem download batch file
  187.          Endcase
  188.          Case "N"
  189.              Transmit "^M"
  190.              Dos "c:\pcp\zmodem-d"       ; your zmodem download batch file
  191.              Waitfor "Command?"
  192.              Transmit "QUIT^M"
  193.          Endcase
  194.      Endswitch
  195.      Return